module.exports = () =>  (async (req, res, next) => {
  // 把资源的名称转为模型的名称
  const modelName = require('inflection').classify(req.params.resource)
  // 挂载到req.model上
   req.model = require(`../models/${modelName}`)
  next()
})
